package com.hill;

public class ForEachTest {
    public static void main(String[] args) {
//       String str= "i love studing";
//        char[] chars = str.toCharArray();
//        for( char p :  chars)
//        System.out.print(p +" ") ;
        //可以简化如下:
        for(char c :"i love studing".toCharArray() )
            System.out.print(c +" ");
    }
}
